package com.eastfair.transport.api;

import com.eastfair.core.base.R;
import com.eastfair.transport.dto.BindServiceProviderRoleDTO;
import com.eastfair.transport.dto.RemoveServiceProviderRoleDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @Author lyw
 * @Date 2022/8/10 9:58
 */
@FeignClient(value = "main-transport/transportRegister")
public interface TransportRegisterFeign {

    /**
     * 主场服务商绑定角色.
     *
     * @param bindHomeServiceProviderRoleDTO
     * @return
     */
    @PostMapping("/bind/role")
    R<Boolean> bindServiceProviderRole(@RequestBody BindServiceProviderRoleDTO bindHomeServiceProviderRoleDTO);


    /**
     * 主场服务商移除角色
     *
     * @param removeHomeServiceProviderRoleDTOList
     * @return
     */
    @PostMapping("/remove/role")
    R<Boolean> removeServiceProviderRole(@RequestBody List<RemoveServiceProviderRoleDTO> removeHomeServiceProviderRoleDTOList);
}
